Florian Müllner [Tue, 17 Dec 2019 00:00:40 +0000 (01:00 +0100)]
panel: Disable menu-toggle shortcuts while top bar is hidden
We currently handle the case where the indicator itself is disabled
(read: hidden), but not when the entire top bar is invisible (for
instance when the primary monitor is in fullscreen state).
It is odd to pop up a top bar menu without the top bar, so check for
the indicator's mapped- instead of visible state.
Epiphany and Evolution updated their desktop IDs years ago. I assume the
rename list in appFavorites.js ensures this is still working properly
despite the obsolete names.
Florian Müllner [Tue, 3 Dec 2019 02:02:30 +0000 (03:02 +0100)]
extensions-tool: Set up translations for standalone builds
While we can now build gnome-extensions-tool as stand-alone project,
we are currently missing any translations, as those are part of
gnome-shell.
The easiest option for addressing this would be to symlink the toplevel
po directory into the subproject, however that would mean duplicating
the entire gnome-shell message catalogs.
So instead, set up a bare po directory and provide a script to populate
it from the translations in the toplevel po directory.
Florian Müllner [Mon, 2 Dec 2019 23:07:01 +0000 (00:07 +0100)]
extensions-tool: Move to a subproject
The gnome-extensions tool code is really independent from the rest of the
code base, and could be used either as part of the gnome-shell build or as
stand-alone project (for example for the extension-ci docker image).
We can actually support both cases by moving the code to a subproject.
Florian Müllner [Mon, 2 Dec 2019 23:43:08 +0000 (00:43 +0100)]
build: Remove left-over file
The file was generated when importing gnome-extensions-tool from
a standalone repository. It isn't used by the build system, and
really shouldn't have ended up in the repository at all.
Umang Jain [Tue, 10 Dec 2019 19:05:10 +0000 (00:35 +0530)]
StPasswordEntry: Add the peek-password-icon for show/hide passwords
Also introduce a "show-peek-icon" property to enable/disable
the peek-password-icon in the password entry. This is useful
in cases where the peeking the password functionality needs
to be avoided.
Umang Jain [Fri, 13 Dec 2019 12:37:57 +0000 (18:07 +0530)]
st-entry: Remove caps-lock feedback warning
This frees the entry's secondary icon that for other uses.
Caps-lock-warning feedback has been moved to be shown in
the various dialogs instead in the password-entries itself.
StPasswordEntry can now use a peek-password icon as the
secondary icon to show/hide the password present in the
entry.
Umang Jain [Thu, 12 Dec 2019 09:32:53 +0000 (15:02 +0530)]
js: Use StPasswordEntry for password entry fields
Use the new StPasswordEntry for password entry fields
and remove all direct handling of clutter text of the entry
via clutter_text_set_password_char to show/hide the password
text. StPasswordEntry will provides a peek-password-icon which
will allow to show/hide the password present in the field to
the user in subsequent commits.
Umang Jain [Thu, 12 Dec 2019 09:08:42 +0000 (14:38 +0530)]
shellEntry: Handle PasswordEntries automatically
shellEntry should not need to query the clutter-text directly
in order to know if the entry is for passport-input purpose.
shellEntry can easily determine a password-entry by querying
if it is an instance of StPasswordEntry and use it's API
whereever relevant.
Umang Jain [Tue, 12 Nov 2019 13:14:17 +0000 (18:44 +0530)]
St: Add a StPasswordEntry subclass based on StEntry
StPasswordEntry will be put to use for password entries
in various shell dialogs. This is done to have a consistent
behaviour for all password entries and introduce a peek
password functionality for these password entries in the
subsequent commits.
Carlos Garnacho [Fri, 13 Dec 2019 17:14:51 +0000 (18:14 +0100)]
workspace: Pass device to startDrag()
This is necessary to make DnD operations work from tablet devices on
wayland, as it's not the same onscreen pointer sprite than mice. Fixes
window DnD in the overview on tablet devices, no longer having them stick
to the wrong pointer.
Bastien Nocera [Thu, 24 Oct 2019 12:39:25 +0000 (14:39 +0200)]
shell-app: Add discrete GPU support for NVidia drivers
Use data from switcheroo-control to know which environment variables
to use to launch an application on the discrete GPU. switcheroo-control
version 2.0 or newer should be installed on Linux platforms.
Florian Müllner [Wed, 27 Nov 2019 22:01:15 +0000 (23:01 +0100)]
weather: Only require auto-location authorization if sandboxed
Since commit 87e60ed97843, geoclue no longer pretends that authorization
is useful for system-installed apps (as they can easily lie about their
ID). Unfortunately this broke our auto-location support in case Weather
is installed non-sandboxed, as we are waiting for an authorization that
will never happen.
Unbreak it by only requiring authorization when installed as Flatpak.
Florian Müllner [Fri, 6 Dec 2019 17:07:35 +0000 (18:07 +0100)]
popupMenu: Close when a system modal pops up
Just like switcher popups, popup menus don't play well together with
system modals, and generally have a lower priority. So just like
switcher popups, close popup menus when a system modal dialog pops
up.
Florian Müllner [Fri, 6 Dec 2019 12:56:24 +0000 (13:56 +0100)]
switcherPopup: Dismiss when a system modal dialog opens
As system modal dialogs may open without user interaction (for instance
polkit or network agent requests), it is possible for them to pop up
while the app/window switcher is up.
The current result of having both up simultaneously is clearly broken,
so we can either dismiss the popup or prevent the modal dialog from
opening. Assume that the dialog indicates a more important action and
should therefore take precedence, so go with the former.
Florian Müllner [Thu, 5 Dec 2019 13:12:47 +0000 (14:12 +0100)]
perf-helper: Add content for custom drawing
Drawing windows got a lot more involved with the advent of client-side
decorations. Instead of accounting for visible and invisible borders,
titlebar and shadows when necessary, just add an empty child for the
custom drawing.
Jonas Dreßler [Thu, 31 Oct 2019 23:44:02 +0000 (00:44 +0100)]
appDisplay: Rename _allItems array to _orderedItems
Since both the `_items` object and the `_allItems` array include the
same items, the difference between those variables seems unclear. The
real difference between them (except the different data type) is that
`_allItems` is ordered in the same order as the visible grid, so rename
`_allItems` to `_orderedItems` which makes that more obvious.
Jonas Dreßler [Wed, 4 Dec 2019 20:37:34 +0000 (21:37 +0100)]
checkBox: Fix expand and align properties
In f2bd39b20c89c1896c124f1dccdd587aa544e45c, the expand property for
checkboxes was accidentally set to the grandchild (the StBin), instead
of the child (the StBoxLayout) of the StButton. Fix that and let the
BoxLayout expand instead of the Bin.
Florian Müllner [Sat, 30 Nov 2019 18:15:14 +0000 (19:15 +0100)]
extensionPrefs: Always redefine getCurrentExtension() on prefsModule access
We have three interactions with an extension's prefs module:
- we import the module
- we call its init() hook
- we call its buildPrefsWidget() hook
The first two are one-time actions where we expect most getCurrentExtension()
calls (local imports, initTranslations() etc.).
However it's still possible that the extension will use the utility function
in buildPrefsWidget() as well, either directly or via other functions like
getSettings(): Make sure getCurrentExtension() returns the correct extension
in that case, not the last one whose preferences were initialized.
appDisplay: Show newly created folder when creating
The icon grid currently sorts icons by their names. When creating new
folders, the folder may end up being in a different page, and that's
confusing since we don't actually move to where the new folder is.
Jonas Dreßler [Wed, 4 Dec 2019 20:23:20 +0000 (21:23 +0100)]
closeDialog: Fix scale of dialog for x11 clients in Wayland sessions
We missed this case in b6e57a5ae8e3871161e2bdcc44e46af1cc56b2f7,
XWayland clients obviously don't use MetaWindowWayland and thus they
don't apply the double scaling that commit was meant to fix.
Florian Müllner [Wed, 4 Dec 2019 19:01:41 +0000 (20:01 +0100)]
keyboard: Create extended keys before updating hover state
We want extended keys to have the same size as their parent key,
but this is currently broken and the keys end up with their
parent key's preferred size (which is smaller than its allocated
size).
This is due to the way ClutterActor's width/height properties work,
which only return the "real" (i.e. allocated) size when the allocation
is valid, and fall back to the preferred size otherwise.
As changing an StWidget's hover state involves adding or removing
the `:hover` pseudo class, this is currently always the case.
Creating the extended keys first means the keyButton's allocation
is probably valid, so do that.
Florian Müllner [Wed, 4 Dec 2019 18:02:33 +0000 (19:02 +0100)]
keyboard: Fix widget leak
We currently create an extended-keys popup every time it is requested,
but only destroy it (or rather: the last one) when the keyboard itself
is destroyed.
Jonas Ådahl [Fri, 22 Nov 2019 17:36:17 +0000 (18:36 +0100)]
Use paint and pick context to get framebuffer
Mutter and Clutter was changed to pass around the current target
framebuffer via the paint context instead of via the deprecated Cogl
framebuffer stack.
The framebuffer stack has also been removed from Cogl so change to use
the one in the paint context instead.
Jonas Ådahl [Fri, 22 Nov 2019 17:35:55 +0000 (18:35 +0100)]
Adapt to painting and picking API change
While still leaving them unused, pass around ClutterPaintContext and
ClutterPickContext when painting and picking.
The reason for splitting this change up in two is to make it possible to
bisect easier in between the API change and the change to using the
framebuffer passed around with the temporary contexts.
This code didn't even pay attention to the
cur_stmt->kind.media_rule->media_list, and unconditonally considered
each statement in the ->ruleset to be of kind ruleset. That seems
broken.
(The theme doesn't use any @media queries, and they are unsupported
anyway.)
Florian Müllner [Fri, 29 Nov 2019 00:11:16 +0000 (01:11 +0100)]
switcherPopup: Fix scrollable check
When commit c6cea277e replaced Shell.GenericContainer, the check
whether the required width exceeds the avilable width was changed
from using the minimum widths of items to the natural width of the
scroll view.
That doesn't work correctly, as the *natural* width may well exceed
the actually used width: SwitcherList bases its width request on
children's minimum sizes to force labels to ellipsize.
Fix this by using the minimum width of the scroll view's child instead.
Florian Müllner [Thu, 28 Nov 2019 00:23:36 +0000 (01:23 +0100)]
calendar-server: Use correct timezone for all-day events
Since commit 28c535e34, we use the timezone associated with the ICalTime
instead of the default timezone when converting to time_t. However while
that is correct for most events, for ICalTimes that don't have a timezone
associated we still want to fall back to the default timezone instead of
UTC.
Prevent the app-well-app-running dot from getting unintentionally
hidden behind the overview-icon background by initializing the
running-dot after its sibling overview-icon.
Florian Müllner [Mon, 25 Nov 2019 21:54:44 +0000 (22:54 +0100)]
fileUtils: Delete deleteGFile hack
It is true that delete is a javascript keyword, but that doesn't
prevent it from being used as method name - there are event built-in
types like Map or Set with delete() methods!
So if that hack was ever needed, this hasn't been the case for years
now; just removed the hack now.
texture-cache: Remove also scaled keys from the cache
We're storing in the texture cache images and scaled images appending
the scaling factor to the key. When a file changes the cache key
corresponding to that file is removed, but not the keys for the scaled
ones so that images in the cache are never reloaded.
This patch removes all keys from the cache related to the file that
changes, including those with the scaling factor.
A new set (hash table) was added to keep track of scale used to be able
to remove all possible images in the cache.
When the KEY is removed from the cache, we can look now in the scale set
for and each scale we also remove the key "KEY1.000000", "KEY2.000000",
etc.
Assuming that the number of used scales is small (I would typically
expect one or two), the overhead should be negligible.
Benjamin Berg [Mon, 25 Nov 2019 14:15:01 +0000 (15:15 +0100)]
data: Enable clean session shutdown after gnome-shell failure
If the GNOME shell crashes, we run a service that may disable
extensions. This is important so that users will not be locked out of
their own session in case an extension is causing crashes.
As this is a very agressive action, we tried to only do this in the
first two minutes of the session. Unfortunately, the logic was broken
and would result in an unclean session shutdown.
Fix this by using the newly introduced gnome-shell-disable-extensions
file. This is created by the extension subsystem for a period of time to
indicate the extensions may be the cause of a gnome-shell failure.
See
https://gitlab.gnome.org/GNOME/gnome-session/issues/43
for a log of the bug happening and the gnome-session part to fix this.
Benjamin Berg [Mon, 25 Nov 2019 20:20:02 +0000 (21:20 +0100)]
extensionSystem: Create a file to flag that extensions are being loaded
When the extension system is loaded, create the
gnome-shell-disable-extensions file in the users runtime directory. This
file is automatically removed 60s later. The sole purpose of this file
is to be consumed by the systemd units. If the file exists, the systemd
units will disable extensions when the gnome-shell fails.
Since the notification message close button had no border, or mouse
over effect, there was no way to determine whether the mouse cursor
were over the button.
Improve this by adding a message-close-button class for the close
button, and a styling for its hovered state, based on media control
button styling.
Increases contrast between normal and hovered states in
message-media-control buttons. Previously there was very little
difference between the two states, making it hard to distinguish
whether the mouse cursor was over the button.
Florian Müllner [Mon, 25 Nov 2019 00:49:04 +0000 (01:49 +0100)]
extensions-tool: Fix removing from settings list
When removing a string from a settings list, we iterate over all
existing entries and copy all strings except the one that's being
removed to a new list, which is then written to GSettings.
However we currently always increment the index, so we end up with
a NULL entry in place of the removed entry, which is then interpreted
as the end of the list. In other words, we also remove all entries
that follow the removed string.
Fix this by looping over the list entries instead of the index, and
only increment the index for entries we copy.
Jonas Dreßler [Sat, 23 Nov 2019 21:25:00 +0000 (22:25 +0100)]
appDisplay: Add a timeout when switching pages during DnD
Currently when dragging an icon to the space above or below the appGrid
to switch pages, we do so very quickly without checking when the last
page-switch happened. This makes it hard to move icons to pages which
are not the first or the last one, since the other pages are skipped
very quickly.
To fix this, add a timeout of 1 second that blocks switching pages after
a page-switch using drag overshoot occured.
Florian Müllner [Sat, 23 Nov 2019 14:06:14 +0000 (15:06 +0100)]
appDisplay: Add threshold after overshoot page switches
We currently always switch app pages when a dragged app icon
moves outside the grid boundaries, regardless of any previous
page switches. This makes it too easy to switch multiple pages
accidentally, so add a small threshold that the icon has to
move back towards the grid before allowing another page switch.
Jonas Dreßler [Sat, 23 Nov 2019 20:11:14 +0000 (21:11 +0100)]
appDisplay: Simplify event blocking while folder is opened
There's no need for a `inhibitEventBlocker` interface. Since we connect
to "open-state-changed" of our folders in the AllView anyway, we can
just make the event blocker visible while a folder is opened, and hide
the event blocker during DnD.
This allows keeping the eventBlocker reactive at all times and fixes an
issue where DnD to create a new folder is impossible if no folders are
present because the eventBlocker would not get inhibited.
Florian Müllner [Mon, 26 Feb 2018 19:57:10 +0000 (20:57 +0100)]
slider: Stop emulating drags in key handling
Emitting ::drag-end after changing the slider value via arrow keys
was a cheap way to make the sound feedback work for keyboard input.
But now that the volume indicator plays the sound on ::value-changed
as well, we can stop doing that - after all, key presses aren't drags.
Besides that, this will make the limiting of feedback to actual volume
changes from the previous commit work for key events as well.
Florian Müllner [Fri, 23 Feb 2018 22:58:22 +0000 (23:58 +0100)]
volume: Only emit sound feedback after volume changes
gnome-settings-daemon doesn't play the volume change sound when
the volume stayed the same (that is, it is already at its maximum
or minimum). This looks like the right thing to do, so copy its
behavior.
Florian Müllner [Fri, 23 Feb 2018 22:58:22 +0000 (23:58 +0100)]
volume: Add back sound feedback on scroll
Commit 8d4855f1008 accidentally removed the volume change feedback
for scroll events. Add it back to be consistent again with moving
the slider via arrow keys, slider drags/clicks and gsd's media keys
handling.
Florian Müllner [Wed, 20 Nov 2019 22:15:55 +0000 (23:15 +0100)]
dateMenu: Don't ellipsize forecast times and temps
While those should be concise enough to fit, they may not where
temperatures drop into double-digit negatives. It seems better
to accept some awkward horizontal scrolling in that case than
shorten relevant information.
Florian Müllner [Fri, 22 Nov 2019 22:27:47 +0000 (23:27 +0100)]
dateMenu: Move weather forecast validity check
Commit b779f6f728 added a check to filter out invalid weather forecasts.
However the check is currently done when creating UI for the forecasts,
which means we end up with fewer forecasts than we could display if any
forecasts are invalid.
We can avoid that issue by checking the validity while collecting the
forecasts, so do that instead.
Florian Müllner [Fri, 22 Nov 2019 21:44:42 +0000 (22:44 +0100)]
dateMenu: Only show forecasts
We currently always start with the current weather info, then append
forecasts. This is slightly confusing, as the only hint that the
first item is special is the past (and potentially "odd") time.
Florian Müllner [Wed, 20 Nov 2019 22:23:50 +0000 (23:23 +0100)]
dateMenu: Don't limit weather forecasts to the same day
As we get closer to midnight, we show fewer forecasts than we could
fit, or none at all. It makes more sense to continue the forecasts
into the wee hours in that case, so only exclude past forecasts,
but not ones from following days.
Florian Müllner [Wed, 20 Nov 2019 21:15:26 +0000 (22:15 +0100)]
dateMenu: Try harder finding a reasonable weather location name
Weather stations can have unwieldy long names, which don't fit the
limited space we have available. City names are usually more suitable,
so use the name of the nearest city instead if possible.
Florian Müllner [Wed, 20 Nov 2019 21:21:48 +0000 (22:21 +0100)]
dateMenu: Add some spacing between weather header and location
In case of a very long location name, the label may take up all
available space. Make sure there is at least some spacing between
header and location in that case.
Florian Müllner [Wed, 20 Nov 2019 20:48:03 +0000 (21:48 +0100)]
dateMenu: Bottom-align weather title/location
The two labels use different font sizes, so they don't align properly.
Unfortunately we don't have BASELINE alignment in Clutter, but at least
END comes closer than the default FILL.
Commit c899453800f11 lifted the requirement of switcher keybindings
to contain a modifier, however it is currently only possible to
finish it by letting it time out.
Improve that by also accepting space/enter key presses to confirm the
selection immediately.
Jonas Dreßler [Fri, 22 Nov 2019 19:56:30 +0000 (20:56 +0100)]
switcherPopup: Use roundtrip time when the popup is modifier-less
The noModsTimeout obviously finishes inside a timeout callback, which
means `global.get_current_time()` might return Clutter.CURRENT_TIME (ie.
0) when called inside it, because it's not called while handling an
event. This means when switching apps or activating a window, the
timestamp passed to `activate_window` may be 0, which is the reason why
the altTab switcher is currently broken when using modifier-less
keybindings.
Fix that by using `meta_display_get_current_time_roundtrip`, which
always return a valid timestamp, instead of
`shell_global_get_current_time`.
pageIndicators: Redesign and add position-based animation
Remove setCurrentPage() function, introduce setCurrentPosition() instead,
which allows to have fractional positions.
Make inactive dots smaller, filled and partially transparent, as opposed to
larger and fully opaque active dot. Make dots smaller overall, remove
borders. Interpolate each dot between active and inactive state based on
scroll position.